<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="email=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <meta name="x5-orientation" content="landscape">
    <meta name="x5-fullscreen" content="true">
    <meta name="x5-page-mode" content="app">
    <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
    <link rel="manifest" href="site.webmanifest">
    <title>FC游戏在线玩 | 小霸王其乐无穷</title>
    <meta name="keywords" content="FC/NES模拟器，在线畅玩八十款任天堂红白机游戏，小霸王游戏机其乐无穷。支持魂斗罗/超级玛丽/忍者龙剑传等等任天堂红白机游戏。" />
    <meta name="description" content="非常适合在手机/电脑上在线游玩，近乎完美的还原任天堂FC/NES原版ROM游戏的视频和声音。" />
    <link href="css/jsnes.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <div class="main">
        <div class="panel">
            <div class="controller-area">
                <div class="controller">
                    <div id="controls-direction">
                        <div id="controls-rocker"></div>
                        <button role="BUTTON_UP" class="up joydirection" id="joystick_btn_up">U</button>
                        <button role="BUTTON_RIGHT" class="right joydirection" id="joystick_btn_right">R</button>
                        <button role="BUTTON_DOWN" class="down joydirection" id="joystick_btn_down">D</button>
                        <button role="BUTTON_LEFT" class="left joydirection" id="joystick_btn_left">L</button>
                    </div>
                </div>
                <div class="joy">FC</div>
                <div class="readme">
                    <a href="javascript:keyboard_readme();">
                        按键说明
                    </a>
                    <a href="javascript:declaration_readme();" class="readme_declaration">
                        免责声明
                    </a>
                </div>
                <div id="readme_body" style="display: none;">
                    <p style="font-size: 14px; color: gray; text-align: left;">
                        移动端使用触屏功能操作屏幕按键，电脑端使用键盘进行操作（参考以下按键说明）
                    </p>
                    <table border="1" style="width: 100%; border-collapse: collapse; line-height: 2em;">
                        <thead>
                            <tr><th>操作</th><th>主手柄</th><th>副手柄</th></tr>
                        </thead>
                        <tbody style="text-align: center;">
                            <tr><td>上</td><td>W</td><td>方向键 ↑</td></tr>
                            <tr><td>下</td><td>S</td><td>方向键 ↓</td></tr>
                            <tr><td>左</td><td>A</td><td>方向键 ←</td></tr>
                            <tr><td>右</td><td>D</td><td>方向键 →</td></tr>
                            <tr><td>B</td><td>J</td><td>数字键 1</td></tr>
                            <tr><td>A</td><td>K</td><td>数字键 2</td></tr>
                            <tr><td>选择</td><td>空格键</td><td>数字键 /</td></tr>
                            <tr><td>开始/暂停</td><td>回车键 Enter</td><td>数字键 *</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="function-area">
                <div class="screen">
                    <div id="emulator" align="center" style="width:100%;height:100%"></div>
                </div>
                <div class="function">
                    <button class="controls-center-select joybtn" id="joystick_btn_select" role="BUTTON_SELECT">
                        选择
                    </button>
                    <button class="controls-center-start joybtn" id="joystick_btn_start" role="BUTTON_START">
                        <svg style="color: black; width: 0.75em; height: 0.75em;" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 14 16">
                            <path d="M0 .984v14.032a1 1 0 0 0 1.506.845l12.006-7.016a.974.974 0 0 0 0-1.69L1.506.139A1 1 0 0 0 0 .984Z"/>
                        </svg>
                        <svg style="color: black; width: 0.75em; height: 0.75em;" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 10 16">
                            <path fill-rule="evenodd" d="M0 .8C0 .358.32 0 .714 0h1.429c.394 0 .714.358.714.8v14.4c0 .442-.32.8-.714.8H.714a.678.678 0 0 1-.505-.234A.851.851 0 0 1 0 15.2V.8Zm7.143 0c0-.442.32-.8.714-.8h1.429c.19 0 .37.084.505.234.134.15.209.354.209.566v14.4c0 .442-.32.8-.714.8H7.857c-.394 0-.714-.358-.714-.8V.8Z" clip-rule="evenodd"/>
                        </svg>
                    </button>
                </div>
            </div>
            <div class="action-area">
                <div class="action">
                    <div id="controls-fire">
                        <button class="b joybtn" role="BUTTON_B" id="joystick_btn_B">🟡</button>
                        <button class="a joybtn" role="BUTTON_A" id="joystick_btn_A">🔴</button>
                    </div>
                </div>
            </div>
            <div class="sign">FAMILY <br> COMPUTER</div>
        </div>
    </div>
    <div id="declaration_body" class="declaration">
        免责声明：此游戏资源来源于
        <a href="https://github.com/lucaschungzsj/fcgame" target="_blank">GitHub 开源库 [fcgame]</a>
        和
        <a href="https://gitee.com/mamh-mixed/xiaobawang" target="_blank">Gitee 开源库 [xiaobawang]</a>
        。
        关于游戏内容所引发的署名权等版权异议，本站不承担责任。
        如有异议，请在
        <a href="https://www.haokudelei.com/" target="_blank">好酷的嘞</a>
        底部“留言区”提交反馈。
    </div>
</body>
<script src="lib/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/dynamicaudio-min.js" type="text/javascript" charset="utf-8"></script>
<script src="source/nes.js" type="text/javascript" charset="utf-8"></script>
<script src="source/utils.js" type="text/javascript" charset="utf-8"></script>
<script src="source/cpu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/keyboard.js" type="text/javascript" charset="utf-8"></script>
<script src="source/mappers.js" type="text/javascript" charset="utf-8"></script>
<script src="source/papu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/ppu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/rom.js" type="text/javascript" charset="utf-8"></script>
<script src="source/ui.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/nipplejs.min.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/joystick.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/jweixin-1.6.0.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/sweetalert.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">
    var nes;
    $(function () {
        nes = new JSNES({
            'ui': $('#emulator').JSNESUI({
                "经典热门": [
                    ['魂斗罗', 'roms/Contra1(U)30.nes'],
                    ['超级玛丽', 'roms/(W) Super Mario Bros. [!].nes'],
                    ['坦克', 'roms/(Ch) Missile Tank.nes'],
                    ['双截龙', 'roms/Double Dragon1.nes'],
                    ['冒险岛', 'roms/maoxiandao.nes'],
                    ['中国象棋', 'roms/Zhong Guo Xiang Qi.nes'],
                    ['雪人兄弟', 'roms/xueren.nes'],
                    ['越野摩托', 'roms/Motor.nes'],
                    ['赤影战士', 'roms/Kage.nes'],
                    ['炸弹人', 'roms/zhadan.nes'],
                    ['马戏团', 'roms/ma.nes'],
                    ['沙罗曼蛇', 'roms/Life Force [!].nes'],
                    ['脱狱', 'roms/Cross Fire (J).nes'],
                    ['功夫', 'roms/(J) (V1.2) Yie Ar Kung-Fu [!].nes'],
                    ['双截龙2', 'roms/Double Dragon2.nes'],
                    ['三目童子', 'roms/3.nes'],
                    ['恶魔城1', 'roms/emc.nes'],
                    ['洛克人1', 'roms/lkr.nes'],
                    ['人间兵器', 'roms/rjbq.nes'],
                    ['忍者神龟1', 'roms/sg1.nes'],
                    ['激龟快打', 'roms/sg1.nes'],
                    ['泡泡龙2', 'roms/ppl2.nes'],
                    ['西游记1', 'roms/xyj1.nes'],
                    ['沙罗曼蛇', 'roms/Lifeforce (U).nes'],
                    ['淘金者', 'roms/Championship Lode Runner (J).nes'],
                    ['冒险岛3', 'roms/maoxiandao3.nes'],
                    ['俄罗斯方块', 'roms/elsfk.nes'],
                    ['黑客', 'roms/hk.nes'],
                    ['汤姆历险记', 'roms/tmlxj.nes'],
                    ['绿野仙踪', 'roms/nyxz.nes'],
                    ['公路赛车', 'roms/glsc.nes'],
                    ['屠龙记4', 'roms/tlj4.nes'],
                    ['圣灵传说', 'roms/slcs.nes'],
                    ['魔法总动员', 'roms/mfzdy.nes'],
                    ['口袋妖怪', 'roms/kdyg.nes'],
                    ['武士魂', 'roms/wsh.nes'],
                    ['阿拉丁', 'roms/ald.nes'],
                    ['蝙蝠侠', 'roms/bfx.nes'],
                    ['时空小子', 'roms/skxz.nes'],
                    ['铁血战士', 'roms/txzs.nes'],
                    ['汤姆和杰瑞和塔菲', 'roms/tangmu.nes'],
                    ['总决战', 'roms/zjz.nes'],
                    ['赤影战士', 'roms/cyzs.nes'],
                    ['最游记之唐三藏', 'roms/zyj.nes'],
                    ['围棋大战', 'roms/wqdzz.nes'],
                    ['四川麻将-制服篇', 'roms/scmj.nes'],
                    ['吃豆小精灵', 'roms/cdxjl.nes'],
                    ['异形之太空探险者', 'roms/yx.nes'],
                    ['武林外传', 'roms/wlwz.nes'],
                    ['东方传说', 'roms/dfcs.nes'],
                    ['杀戮战场', 'roms/slzc.nes'],
                    ['救火英雄', 'roms/jhyx.nes'],
                    ['快乐猫', 'roms/klm.nes'],
                    ['机器猫', 'roms/jqm.nes'],
                    ['f1赛车', 'roms/f1sc.nes'],
                    ['米老鼠大冒险', 'roms/mlsdmx.nes'],
                    ['成龙之龙', 'roms/clzl.nes'],
                    ['挖地雷', 'roms/wdl.nes'],
                    ['弹珠台', 'roms/dzt.nes'],
                    ['魔道士阴谋', 'roms/mdsym.nes'],
                    ['古墓丽影', 'roms/gmly.nes'],
                    ['炸弹人', 'roms/zdr.nes'],
                    ['冒险岛4', 'roms/mxd4.nes'],
                    ['4人麻将', 'roms/4rmj.nes'],
                    ['合金风暴', 'roms/hjfb.nes'],
                    ['红楼梦', 'roms/hlm.nes'],
                    ['坦克风云', 'roms/tkfy.nes'],
                    ['幽灵列车', 'roms/yllc.nes'],
                    ['银河时代', 'roms/yhsd.nes'],
                    ['网球', 'roms/wq.nes'],
                    ['神探柯蓝', 'roms/stkl.nes'],
                    ['梦幻', 'roms/mh.nes'],
                    ['梦企鹅物语', 'roms/mqewy.nes'],
                    ['欧陆之战', 'roms/elzz.nes'],
                    ['碰碰车', 'roms/ppc.nes'],
                    ['皮卡丘', 'roms/pkq.nes'],
                    ['外星战将', 'roms/wxzj.nes'],
                ],
            })
        });
    });
</script>
<!--[if IE]>
    <script type="text/vbscript" src="lib/jsnes-ie-hacks.vbscript"></script>
<![endif]-->
<script>
    function touchDwon(evt) {
        nes.keyboard.keyDown({
            keyCode: evt.keyCode
        });
    };

    function touchUp(evt) {
        nes.keyboard.keyUp({
            keyCode: evt.keyCode
        });
    };

    function select(val) {
        if (val.substring(0, 1) == "#") {
            return document.querySelector(val);
        } else {
            return document.getElementById(val);
        }
    }

    var joystick = new Joystick({
        el: select("controls-rocker"),
        mode: 'static',
        color: "#808080",
        size: 100,
        isFourBtn: false,
        keyCodes: [87, 83, 65, 68],
        btn_down_fn: touchDwon,
        btn_up_fn: touchUp,
        relative: true,
    });
    joystick.init();
</script>
<script type="text/javascript" charset="utf-8">
    function keyboard_readme(){
        const docCopy = document.cloneNode(true);
        var div = docCopy.getElementById('readme_body');
        div.style.display = 'block';
        swal({
            title: '按键说明',
            content: div,
            button: '关闭',
        });
    }
    function declaration_readme() {
        const docCopy = document.cloneNode(true);
        var div = docCopy.getElementById('declaration_body');
        div.style.display = 'block';
        div.classList.remove('declaration');
        div.style.textAlign = 'left';
        swal({
            title: '免责声明',
            content: div,
            button: '关闭',
        });
    }
</script>

</html>